package com.xyyhome.web.system.domain;

import javax.persistence.*;

/**
 * Created by ty850 on 2017/5/21.
 */
@Entity
@Table(name = "y_s_r_user_group", schema = "xyyhome", catalog = "")
public class YSRUserGroup {
    private String ysrugId;
    private String ysrugUserId;
    private String ysrugCode;

    @Id
    @Column(name = "ysrug_id", nullable = false, length = 36)
    public String getYsrugId() {
        return ysrugId;
    }

    public void setYsrugId(String ysrugId) {
        this.ysrugId = ysrugId;
    }

    @Basic
    @Column(name = "ysrug_user_id", nullable = true, length = 36)
    public String getYsrugUserId() {
        return ysrugUserId;
    }

    public void setYsrugUserId(String ysrugUserId) {
        this.ysrugUserId = ysrugUserId;
    }

    @Basic
    @Column(name = "ysrug_code", nullable = true, length = 36)
    public String getYsrugCode() {
        return ysrugCode;
    }

    public void setYsrugCode(String ysrugCode) {
        this.ysrugCode = ysrugCode;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        YSRUserGroup that = (YSRUserGroup) o;

        if (ysrugId != null ? !ysrugId.equals(that.ysrugId) : that.ysrugId != null) return false;
        if (ysrugUserId != null ? !ysrugUserId.equals(that.ysrugUserId) : that.ysrugUserId != null) return false;
        if (ysrugCode != null ? !ysrugCode.equals(that.ysrugCode) : that.ysrugCode != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = ysrugId != null ? ysrugId.hashCode() : 0;
        result = 31 * result + (ysrugUserId != null ? ysrugUserId.hashCode() : 0);
        result = 31 * result + (ysrugCode != null ? ysrugCode.hashCode() : 0);
        return result;
    }
}
